import {Config, LoadedData} from "../../common/types";

export type IPCInjectApi = {
    config(): Promise<Config>
    osVersion(): Promise<string>
    loadData(): Promise<LoadedData>
}

export const useIPCInjectApi:()=>IPCInjectApi = ()=>{
    // eslint-disable-next-line @typescript-eslint/ban-ts-comment
    //@ts-ignore
    return window["API"] as IPCInjectApi;
}
